Generic x86 emulator now properly supports 16-bit addressing
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 23 Dec 2005 17:28:33 +0000 (18:28 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 23 Dec 2005 17:28:33 +0000 (18:28 +0100)
commit62cc71c8a8e64296376ea092a1b3107d269bbeee
treeac4cd8f2cc1fc89337bfd4e624ad5297761e9cb1
parentf0010ba27fa5f5f18d051cd427c8a361f3c07cd1
Generic x86 emulator now properly supports 16-bit addressing
by narrowing accesses to SI/DI/SP registers. Also supports
real-mode addressing by shifting and adding the appropriate
segment register for certain stack and string operations
where the effective address is not already known.

todo: Stack operations should have address size specified
by B bit in stack segment descriptor, not by default address
size or address-size override. Probably nothing depends on
the proper behaviour though.

Signed-off-by: Keir Fraser <keir@xensource.com>
xen/arch/x86/x86_emulate.c
xen/include/asm-x86/x86_emulate.h